[mirrors]
http://www.dovecot.org/releases/2.2/dovecot-2.2.15.tar.gz
http://www.mirrorservice.org/sites/distfiles.macports.org/dovecot2/dovecot-2.2.15.tar.gz
http://dovecot.org/releases/2.2/dovecot-2.2.15.tar.gz

[main]
filesize=4747444
sha512=4d84744a23f21dd0923e86fdb1604a0a431e7c1a579f8323fb6643f92ac84754389e5a91fc8e8b53eac4202dba7f8541aa13ada12265e397ecdc15ff9b5c7ada

[deps]
openssl

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags \
  --sbindir="$butch_prefix"/bin \
  --with-ioloop=poll \
  --with-notify=none i_cv_inotify_works=yes \
  lib_cv_va_copy=yes \
  lib_cv___va_copy=no \
  lib_cv_va_val_copy=no \
  i_cv_posix_fallocate_works=no \
  i_cv_signed_size_t=no \
  i_cv_gmtime_max_time_t=31 \
  i_cv_signed_time_t=yes \
  i_cv_mmap_plays_with_write=yes \
  i_cv_signed_size_t=yes \
  i_cv_c99_vsnprintf=yes \
  i_cv_fd_passing=yes \
  --without-lzma --without-gc --without-bzlib
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
install -D -m 644 "$K"/dovecot.conf \
  "$butch_install_dir""$butch_prefix"/etc/dovecot/dovecot.conf

IS="$K"/bin/install-service
"$IS" --down --log --force dovecot "$K"/services/dovecot
